library(tidyverse)
library(rstudioapi)
library(doMC)
library(plot.matrix)
library(caret)
library(proxy)

source("helpers_v1.R")

# loading data
source("../load_data.R")

# loading separate features
load("features_choicechange.Rdata")
load("features_obsct.Rdata")
load("features_pcmplt.Rdata")
load("features_probcorrect.Rdata")
load("features_probswitch.Rdata")
load("features_restime.Rdata")

test_features <- test_features_choicechange %>%
  left_join(test_features_obsct, by = "STUDENTID") %>%
  left_join(test_features_pcmplt, by = "STUDENTID") %>%
  left_join(test_features_probcorrect, by = "STUDENTID") %>%
  left_join(test_features_probswitch, by = "STUDENTID") %>%
  left_join(test_features_restime, by = "STUDENTID")

train_features <- train_features_choicechange %>%
  left_join(train_features_obsct, by = "STUDENTID") %>%
  left_join(train_features_pcmplt, by = "STUDENTID") %>%
  left_join(train_features_probcorrect, by = "STUDENTID") %>%
  left_join(train_features_probswitch, by = "STUDENTID") %>%
  left_join(train_features_restime, by = "STUDENTID")

save(train_features,
     test_features,
     file = "features_combined.Rdata")